package hsb.ruoyi.admin.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import hsb.ruoyi.admin.orm.User;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT id,name FROM user WHERE id = #{id}")
    User getUser(Integer id);

    @Insert("INSERT INTO USER (id, name) VALUES (#{id}, #{name})")
    Integer createUser(@Param("id") Integer id, @Param("name") String name);

    @Delete("DELETE FROM USER WHERE id = #{id}")
    Integer removeUser(Integer id);
}